package com.blog;

import java.text.ParseException;
import java.util.Date;

/**
 * @author xiaoming
 * @version 1.0
 * @date 2018/12/12 16:05
 **/
public class UsefulCodeSnippets {

    public static void main(String[] args) {
    //    Converting String to date in Java
        try {
            Date date = java.text.DateFormat.getDateInstance().parse("2019-01-01");

        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
}
